package com.nxu.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Log {                  // 用户日志
    private int id;                 // 日志编号
    private int who;                // 用户编号
    private String name;            // 用户昵称
    private String ip;              // 机器IP地址
    private LocalDateTime login;    // 登录时间
    private LocalDateTime logout;   // 退出时间
    private int type;               // 操作类型(0-用户在线 1-主动退出 2-会话过期)

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getWho() {
        return who;
    }

    public void setWho(int who) {
        this.who = who;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public LocalDateTime getLogin() {
        return login;
    }

    public void setLogin(LocalDateTime login) {
        this.login = login;
    }

    public LocalDateTime getLogout() {
        return logout;
    }

    public void setLogout(LocalDateTime logout) {
        this.logout = logout;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}